import {getCzjd} from '@/api/gis'

const gis = {
    state: {
        chanzhijindu: []
    },

    mutations: {
        // 产值进度
        SET_CHANZHIJINDU: (state, data) => {
            state.chanzhijindu = data

        },
        SET_MODELATTRLIST: (state, modelAttrList) => {
            state.chanzhijindu = modelAttrList
        },
    },

    actions: {
        // 新增关联 树与gis绑定
        GetCzjd({commit}, params) {
            return new Promise((resolve, reject) => {
                getCzjd(params).then(response => {
                    commit('SET_CHANZHIJINDU', response.content)
                    resolve(response)
                }).catch(error => {
                    reject(error)
                })
            })
        },
    }
}

export default gis
